package com.yc.order.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yc.vo.OrderitemVO;
import org.apache.ibatis.annotations.Select;
import org.springframework.data.relational.core.sql.In;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface OrderitemVODao extends BaseMapper<OrderitemVO> {

    /**
     * 根据ono查订单号对应订单详情
     * @param ono
     * @return
     */
    @Select("select orderiteminfo.*,gname,pics,unit,weight from orderiteminfo " +
            "join goodsinfo on goodsinfo.gno=orderiteminfo.gno where ono=#{ono}")
    List<OrderitemVO> findByono(String ono);
}
